package es.upv.tricia.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageButton;
import es.upv.tricia.R;

public class SplashActivity extends Activity implements OnClickListener
{
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

		setContentView(R.layout.splash);

		final ImageButton image = (ImageButton) findViewById(R.id.imageButtonQuiz);
		Animation anim = AnimationUtils.loadAnimation(this, R.anim.rotate_left);

		image.setAnimation(anim);

		image.setOnClickListener(this);

	}

	@Override
	public void onClick(View v)
	{
		if (v.getId() == R.id.imageButtonQuiz) {
			startActivity(new Intent(this, MainActivity.class));
			finish();
		}
	}
}